<template>
  <div>
    <ul>
      <li><router-link to="/second/All">ALL consta</router-link></li>
      <li><router-link to="/second/Alice">ALice</router-link></li>
      <li><router-link to="/second/Bob">Bob</router-link></li>
    </ul>
    <button @click="RandomShow">随机显示</button>
    <router-view></router-view>
  </div>
</template>

<script>
export default {
  methods: {
    RandomShow() {
      let arr = ["/second/All", "/second/Alice", "/second/Bob"];
      this.$router.push({
        path: arr[Math.floor(Math.random() * arr.length)],
      });
    },
  },
};
</script>

<style>
</style>